package com.wms.source;

import org.openbravo.client.kernel.BaseComponentProvider;
import org.openbravo.client.kernel.Component;
import org.openbravo.client.kernel.ComponentProvider;
import javax.enterprise.context.ApplicationScoped;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;

@ApplicationScoped
@ComponentProvider.Qualifier(ImportJsFileComponentProvider.WMS_RESOURCE_IMPORT)
public class ImportJsFileComponentProvider extends BaseComponentProvider {
	public static final String WMS_RESOURCE_IMPORT = "WMS_RESOURCE_IMPORT";

	@Override
	public Component getComponent(String componentId, Map<String, Object> parameters) {
		throw new IllegalArgumentException("Component id " + componentId + " not supported.");
	}

	@Override
	public List<ComponentResource> getGlobalComponentResources() {
		final List<ComponentResource> globalResources = new ArrayList<ComponentResource>();
		globalResources.add(createStaticResource("web/com.wms/inout/inventory.js", false));
		globalResources.add(createStaticResource("web/com.wms/inout/material-list.js", false));
		globalResources.add(createStaticResource("web/com.wms/inout/wms-storage-batch.js", false));
		globalResources.add(createStaticResource("web/com.wms/inout/wms-sales-return.js", false));


		globalResources.add(createStaticResource("web/com.wms/returns/wms-return-goods.js", false));
		globalResources.add(createStaticResource("web/com.wms/returns/wms-workshop-returns.js", false));
		
		globalResources.add(createStaticResource("web/com.wms/wms-change-function.js", false));
		globalResources.add(createStaticResource("web/com.wms/inout/QualityFileResultButton.js", false));
		return globalResources;
	}

	public List<String> getTestResources() {
		return Collections.emptyList();
	}
}
